In the infinite loop case above, all threads except main are in a waiting state (on a semaphore, or waiting for some event).
在上述死循环的情况下,所有除主线程之外的线程都处于某种等待状态(等待一个信号量,或等待某个事件)。
Instead, the program enters a while loop waiting for new connections.
相反,程序进入一个while循环,等待新的连接。
The main loop enters an indefinite loop, waiting for events and calling callbacks, until someone calls gtk_main_quit() by closing the window.
主循环进入无限循环,等候事件并调用回调,直到有人关闭窗口,调用 gtk_main_quit() 为止。
应用推荐